/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ShipdetailsDlg.java
 *
 * Created on Jul 24, 2011, 12:25:54 AM
 */

package com.viweb.storemanager.ui.shipping;

/**
 *
 * @author qhvic
 */
public class ShipdetailsDlg extends javax.swing.JDialog {

    /** Creates new form ShipdetailsDlg */
    public ShipdetailsDlg(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        pnlProduct = new javax.swing.JPanel();
        lblProductcatogories = new javax.swing.JLabel();
        lblProductTypes = new javax.swing.JLabel();
        cbbProductcatogories = new javax.swing.JComboBox();
        cbbProductTypes = new javax.swing.JComboBox();
        scpProducts = new javax.swing.JScrollPane();
        tblProducts = new javax.swing.JTable();
        pnlSelected = new javax.swing.JPanel();
        scpProductChoose = new javax.swing.JScrollPane();
        tblProductChoose = new javax.swing.JTable();
        pnlComment = new javax.swing.JPanel();
        scpComment = new javax.swing.JScrollPane();
        txtComment = new javax.swing.JTextArea();
        pnlPayment = new javax.swing.JPanel();
        lblSum = new javax.swing.JLabel();
        lblTotal = new javax.swing.JLabel();
        lblTotalQuanlity = new javax.swing.JLabel();
        lblSumDiscount = new javax.swing.JLabel();
        txtSum = new javax.swing.JFormattedTextField();
        txtSumDiscount = new javax.swing.JFormattedTextField();
        txtTotal = new javax.swing.JFormattedTextField();
        txtTotalQuanlity = new javax.swing.JFormattedTextField();
        pnlControl = new javax.swing.JPanel();
        btnSave = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        pnlSelection = new javax.swing.JPanel();
        btnAdd = new javax.swing.JButton();
        btnRemove = new javax.swing.JButton();
        pnlPercent = new javax.swing.JPanel();
        lblDiscount = new javax.swing.JLabel();
        lblPercent = new javax.swing.JLabel();
        spnDiscount = new javax.swing.JSpinner();
        lblTableName = new javax.swing.JLabel();
        lblDateTime = new javax.swing.JLabel();
        lblNumber = new javax.swing.JLabel();
        lblCommentAboutCurrency = new javax.swing.JLabel();
        lblDatemodifier = new javax.swing.JLabel();
        lblDatemodifierEdit = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(new java.awt.GridBagLayout());

        pnlProduct.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thông tin mặt hàng", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), java.awt.Color.blue)); // NOI18N
        pnlProduct.setLayout(new java.awt.GridBagLayout());

        lblProductcatogories.setText("Ngành hàng:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 0);
        pnlProduct.add(lblProductcatogories, gridBagConstraints);

        lblProductTypes.setText("Loại mặt hàng");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        pnlProduct.add(lblProductTypes, gridBagConstraints);

        cbbProductcatogories.setMinimumSize(new java.awt.Dimension(260, 23));
        cbbProductcatogories.setPreferredSize(new java.awt.Dimension(260, 23));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
        pnlProduct.add(cbbProductcatogories, gridBagConstraints);

        cbbProductTypes.setMinimumSize(new java.awt.Dimension(260, 23));
        cbbProductTypes.setPreferredSize(new java.awt.Dimension(260, 23));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
        pnlProduct.add(cbbProductTypes, gridBagConstraints);

        scpProducts.setMaximumSize(new java.awt.Dimension(20767, 20767));

        tblProducts.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        scpProducts.setViewportView(tblProducts);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
        pnlProduct.add(scpProducts, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(pnlProduct, gridBagConstraints);

        pnlSelected.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Mặt hàng đã chọn", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), java.awt.Color.blue)); // NOI18N
        pnlSelected.setLayout(new java.awt.GridBagLayout());

        tblProductChoose.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        scpProductChoose.setViewportView(tblProductChoose);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        pnlSelected.add(scpProductChoose, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(pnlSelected, gridBagConstraints);

        pnlComment.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Ghi chú", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), java.awt.Color.blue)); // NOI18N
        pnlComment.setLayout(new java.awt.GridBagLayout());

        txtComment.setColumns(20);
        txtComment.setRows(5);
        scpComment.setViewportView(txtComment);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        pnlComment.add(scpComment, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
        getContentPane().add(pnlComment, gridBagConstraints);

        pnlPayment.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thanh toán", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), java.awt.Color.blue)); // NOI18N
        pnlPayment.setLayout(new java.awt.GridBagLayout());

        lblSum.setText("Tổng:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
        pnlPayment.add(lblSum, gridBagConstraints);

        lblTotal.setText("Tổng cộng:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
        pnlPayment.add(lblTotal, gridBagConstraints);

        lblTotalQuanlity.setText("Tổng số mặt hàng:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
        pnlPayment.add(lblTotalQuanlity, gridBagConstraints);

        lblSumDiscount.setText("Giảm:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
        pnlPayment.add(lblSumDiscount, gridBagConstraints);

        txtSum.setMinimumSize(new java.awt.Dimension(100, 22));
        txtSum.setPreferredSize(new java.awt.Dimension(100, 22));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        pnlPayment.add(txtSum, gridBagConstraints);

        txtSumDiscount.setMinimumSize(new java.awt.Dimension(100, 22));
        txtSumDiscount.setPreferredSize(new java.awt.Dimension(100, 22));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        pnlPayment.add(txtSumDiscount, gridBagConstraints);

        txtTotal.setMinimumSize(new java.awt.Dimension(100, 22));
        txtTotal.setPreferredSize(new java.awt.Dimension(100, 22));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        pnlPayment.add(txtTotal, gridBagConstraints);

        txtTotalQuanlity.setMinimumSize(new java.awt.Dimension(30, 22));
        txtTotalQuanlity.setPreferredSize(new java.awt.Dimension(30, 22));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
        pnlPayment.add(txtTotalQuanlity, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
        getContentPane().add(pnlPayment, gridBagConstraints);

        pnlControl.setLayout(new java.awt.GridBagLayout());

        btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/viweb/storemanager/imgae/save.png"))); // NOI18N
        btnSave.setText("Lưu");
        btnSave.setMaximumSize(new java.awt.Dimension(82, 25));
        btnSave.setMinimumSize(new java.awt.Dimension(82, 25));
        btnSave.setPreferredSize(new java.awt.Dimension(82, 25));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        pnlControl.add(btnSave, gridBagConstraints);

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/viweb/storemanager/imgae/media_stop_red.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.setMaximumSize(new java.awt.Dimension(82, 25));
        btnClose.setMinimumSize(new java.awt.Dimension(82, 25));
        btnClose.setPreferredSize(new java.awt.Dimension(82, 25));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        pnlControl.add(btnClose, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(pnlControl, gridBagConstraints);

        pnlSelection.setLayout(new java.awt.GridBagLayout());

        btnAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/viweb/storemanager/imgae/nav-right.png"))); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);
        pnlSelection.add(btnAdd, gridBagConstraints);

        btnRemove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/viweb/storemanager/imgae/nav-left.png"))); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        pnlSelection.add(btnRemove, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridheight = 2;
        getContentPane().add(pnlSelection, gridBagConstraints);

        pnlPercent.setLayout(new java.awt.GridBagLayout());

        lblDiscount.setText("Giảm giá");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.weightx = 1.0;
        pnlPercent.add(lblDiscount, gridBagConstraints);

        lblPercent.setText("%");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        pnlPercent.add(lblPercent, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        pnlPercent.add(spnDiscount, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        getContentPane().add(pnlPercent, gridBagConstraints);

        lblTableName.setFont(new java.awt.Font("Trebuchet MS", 0, 18));
        lblTableName.setForeground(java.awt.Color.blue);
        lblTableName.setText("Bàn: " + this.payment.getTable().getName());
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5);
        getContentPane().add(lblTableName, gridBagConstraints);

        lblDateTime.setText("Ngày: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        getContentPane().add(lblDateTime, gridBagConstraints);

        lblNumber.setText("Số: (N/A)");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        getContentPane().add(lblNumber, gridBagConstraints);

        lblCommentAboutCurrency.setText("(Đơn vị tiền thanh toán: VNĐ)");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        getContentPane().add(lblCommentAboutCurrency, gridBagConstraints);

        lblDatemodifier.setText("Ngày cập nhật:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
        getContentPane().add(lblDatemodifier, gridBagConstraints);

        lblDatemodifierEdit.setMaximumSize(new java.awt.Dimension(270, 14));
        lblDatemodifierEdit.setMinimumSize(new java.awt.Dimension(270, 14));
        lblDatemodifierEdit.setPreferredSize(new java.awt.Dimension(270, 14));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
        getContentPane().add(lblDatemodifierEdit, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                ShipdetailsDlg dialog = new ShipdetailsDlg(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdd;
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnRemove;
    private javax.swing.JButton btnSave;
    private javax.swing.JComboBox cbbProductTypes;
    private javax.swing.JComboBox cbbProductcatogories;
    private javax.swing.JLabel lblCommentAboutCurrency;
    private javax.swing.JLabel lblDateTime;
    private javax.swing.JLabel lblDatemodifier;
    private javax.swing.JLabel lblDatemodifierEdit;
    private javax.swing.JLabel lblDiscount;
    private javax.swing.JLabel lblNumber;
    private javax.swing.JLabel lblPercent;
    private javax.swing.JLabel lblProductTypes;
    private javax.swing.JLabel lblProductcatogories;
    private javax.swing.JLabel lblSum;
    private javax.swing.JLabel lblSumDiscount;
    private javax.swing.JLabel lblTableName;
    private javax.swing.JLabel lblTotal;
    private javax.swing.JLabel lblTotalQuanlity;
    private javax.swing.JPanel pnlComment;
    private javax.swing.JPanel pnlControl;
    private javax.swing.JPanel pnlPayment;
    private javax.swing.JPanel pnlPercent;
    private javax.swing.JPanel pnlProduct;
    private javax.swing.JPanel pnlSelected;
    private javax.swing.JPanel pnlSelection;
    private javax.swing.JScrollPane scpComment;
    private javax.swing.JScrollPane scpProductChoose;
    private javax.swing.JScrollPane scpProducts;
    private javax.swing.JSpinner spnDiscount;
    private javax.swing.JTable tblProductChoose;
    private javax.swing.JTable tblProducts;
    private javax.swing.JTextArea txtComment;
    private javax.swing.JFormattedTextField txtSum;
    private javax.swing.JFormattedTextField txtSumDiscount;
    private javax.swing.JFormattedTextField txtTotal;
    private javax.swing.JFormattedTextField txtTotalQuanlity;
    // End of variables declaration//GEN-END:variables

}
